package com.cg.result;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
/**
 * Copyright (C), 2024-2024, BUG闭退！
 * Author: Huang先森
 * Date: 2024/12/19 11:30
 * FileName: PageDTo
 * Description:
 */

@Data
@Schema(description = "分页对象")
public class PageDTO {

    @Schema(description = "当前页码")
    @NotNull(message = "当前页码不能为空")
    @Min(value = 1, message = "当前页码不能小于1")
    @Parameter(required = true)
    private Integer pageNumber = 1;
    @Schema(description = "每页显示数量")
    @NotNull(message = "每页显示数量不能为空")
    @Min(value = 1, message = "每页显示数量不能小于1")
    @Parameter(required = true)
    private Integer pageSize = 10;

}
